<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
  <title>文章列表</title>
</head>
<body>
<s:iterator value="msgPage">
  <div>
    <p>
      <span>${title}</span>
      <span>${publishTime}</span>
      <span>${username}</span>
    </p>
    <p>${content}</p>
    <p>
      <a href="comment_addPrepare.action?articleId=${id}">评论</a>
      <a href="comment_list.action?articleId=${id}">跟帖</a>
      <a href="article_editPrepare.action?id=${id}">编辑</a>
      <a href="article_delete.action?id=${id}">删除</a>
    </p>
  </div>
  <p>====================================================</p>
</s:iterator>
<span>页面：${currentPage}/${numPage}</span> <span>总记录数：${countMsg}</span>
<span>分页：</span>
<s:iterator var="counter" begin="%{indexBegin}" end="%{indexEnd}" >
  <s:if test="currentPage == #counter">
    <span>${counter}</span>
  </s:if>
  <s:else>
    <s:a href="article_list?targetPage=%{#counter}">${counter}</s:a>
  </s:else>
</s:iterator>
<br>
  <a href="article_addPrepare">发表文章</a>
</body>
</html>